package com.group.config;

import com.group.entity.ProjectOutside;
import com.group.service.ProjectOutsideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
@SuppressWarnings("all")
public class Async {

    @Autowired
    ProjectOutsideService projectOutsideService;

    @Scheduled(cron = "0 0 1 * * ?")
    //每天凌晨一点
    public List<ProjectOutside> findMinGanProject() {
        HashMap map = new HashMap();
        map.put("projectName", "恶心");
        map.put("projectName", "裸体");
        map.put("projectName", "幼女");
        List<ProjectOutside> projectOutsideList = (List<ProjectOutside>) projectOutsideService.listByMap(map);
        return projectOutsideList;
    }

}
